<%@ page language="java" contentType="text/html; charset=UTF-8" pageEncoding="UTF-8" %>
<%@ include file="/commons/pages/taglibs.jsp" %>
<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
<html xmlns="http://www.w3.org/1999/xhtml">
<head>
<meta http-equiv="Content-Type" content="text/html; charset=UTF-8" />
<title>${r"${naviString}"}</title>
<link href="${r"${ctx}"}/commons/styles/themes/blue/styles/style.css" rel="stylesheet" type="text/css" />
</head>
<body>
<script type="text/javascript" src="../../commons/scripts/calendar.js"></script>
<div align="center">
  <div align="center" style="width: 99%">
    <div align="left" class="nav">${r"${naviString}"}</div>
    <fieldset>
    <legend>快速搜索</legend>
    <html-el:form action="/manager/${classname}">
      <html-el:submit value="快速搜索" />
    </html-el:form>
    </fieldset>
    <%@ include file="/commons/pages/messages.jsp" %>
    <br/>
    <form id="listForm" name="listForm" method="post" action="${classname}.do?method=delete&${primaryKey}=${r"${af.map."}${primaryKey}${r"}"}">
      <div style="text-align: left">
        <input type="button" name="delete" id="delete" value="删除所选" onclick="this.form.action += '&' + ${r"$('#bottomPageForm')"}.serialize();confirmDeleteAll(this.form);" />
        <input type="button" name="add" id="add" value="添加" onclick="location.href='${classname}.do?method=add&${primaryKey}=${r"${af.map."}${primaryKey}${r"}"}';" />
        <input type="hidden" name="method" id="method" value="delete" />
      </div>
      <br/>
      <table width="100%" border="0" cellpadding="0" cellspacing="1" class="datagrid">
        <tr>
          <th width="5%" nowrap="nowrap"><input name="chkAll" type="checkbox" id="chkAll" value="-1" onclick="checkAll(this);" /></th>
          <#list fields as f ><#if f.comments != " ">
          <th width="40%" nowrap="nowrap" >${f.comments}</th><#else>
          <th width="40%" nowrap="nowrap" >${f.name}</th>
          </#if>
          </#list>
          
        </tr>
        <c:forEach var="cur" items="${r"${entityList}"}">
          <tr>
            <td align="center"><input name="pks" type="checkbox" id="pks" value="${r"${cur."}${primaryKey}${r"}"}" /></td>
            <td align="left"><a href="${classname}.do?method=view&amp;${primaryKey}=${r"${af.map."}${primaryKey}${r"}"}"}">${r"${fn:escapeXml(cur.name)}"}</a></td>
            <#list fields as f ><#if (f_index > 0)>
            <td align="left">${r"${fn:escapeXml(cur."}${f.name}${r")}"}</td>
            </#if>
            </#list>
          </tr>
        </c:forEach>
      </table>
    </form>
    <form id="bottomPageForm" name="bottomPageForm" method="post" action="${classname}.do">
      <table width="98%" border="0" align="center" cellpadding="0" cellspacing="0">
        <tr>
          <td height="40" align="center"><script type="text/javascript" src="${r"${ctx}"}/commons/scripts/pager.js">;</script>
            <script type="text/javascript">
            var pager = new Pager(document.bottomPageForm, ${r"${af.map.pager.recordCount}"}, ${r"${af.map.pager.pageSize}"}, ${r"${af.map.pager.currentPage}"});
            pager.addHiddenInputs("method", "list");
            pager.addHiddenInputs("name", "${r"${af.map.name}"}");
            document.write(pager.toString());
            </script></td>
        </tr>
      </table>
    </form>
  </div>
</div>
<script type="text/javascript" src="../../commons/scripts/jquery.js"></script>
<script type="text/javascript" src="../../commons/scripts/rowEffect.js"></script>
</body>
</html>
